package com.distribute.framework.core.web.session;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import javax.servlet.http.HttpSession;


public class RedisSessionRequest extends HttpServletRequestWrapper {

	HttpSession httpSession = null;
	
	public RedisSessionRequest(HttpServletRequest request) {
		super(request);
	}

	@Override
	public HttpSession getSession() {
		if(httpSession==null)
			httpSession = RedisSessionHandler.getInstance(super.getSession());
		return httpSession;
	}

	@Override
	public HttpSession getSession(boolean create) {
		return getSession();
	}

}